package cn.itlaobing.eshop.web.filter.sitemeshtag;/**
 * Created by 1223 on 2017/11/13.
 */

import org.sitemesh.SiteMeshContext;
import org.sitemesh.content.ContentProperty;
import org.sitemesh.content.tagrules.TagRuleBundle;
import org.sitemesh.content.tagrules.html.ExportTagToContentRule;
import org.sitemesh.tagprocessor.State;

/**
 * 类名：
 * 描述：
 * 作者：陈志凯
 * 时间：2017/11/13
 */
public class CssJsTag implements TagRuleBundle {
    @Override
    public void install(State state, ContentProperty contentProperty, SiteMeshContext siteMeshContext) {
        state.addRule("js", new ExportTagToContentRule(siteMeshContext, contentProperty.getChild("js"), false));
        state.addRule("css", new ExportTagToContentRule(siteMeshContext, contentProperty.getChild("css"), false));
    }

    @Override
    public void cleanUp(State state, ContentProperty contentProperty, SiteMeshContext siteMeshContext) {

    }
}
